<template>
	<div id="mine" class="mine">
		<div id="mineCell" class="mineCell">
			<group class="mineCellGroup">
				<cell class="mineCell" :title="userManage" @click.native="onClick('userManage')">
					<img slot="icon" class="mine_icon" src="@/assets/svg/icon_users.svg">
				</cell>
				<cell class="mineCell" :title="roleManage" @click.native="onClick('roleManage')">
					<img slot="icon" class="mine_icon" src="@/assets/svg/icon_roles.svg">
				</cell>
			</group>

			<group class="mineCellGroup">
				<cell class="mineCell" :title="lessonManage" @click.native="onClick('lessonManage')">
					<img slot="icon" class="mine_icon" src="@/assets/svg/icon_lessons.svg">
				</cell>
			</group>

			<group class="mineCellGroup">
				<cell class="mineCell" :title="salesActManage" @click.native="onClick('salesActManage')">
					<img slot="icon" class="mine_icon" src="@/assets/svg/icon_act.svg">
				</cell>
				<cell class="mineCell" :title="stageManage" @click.native="onClick('stageManage')">
					<img slot="icon" class="mine_icon" src="@/assets/svg/icon_stages.svg">
				</cell>
				<cell class="mineCell" :title="oppLevelManage" @click.native="onClick('oppLevelManage')">
					<img slot="icon" class="mine_icon" src="@/assets/svg/icon_opp.svg">
				</cell>
			</group>

			<group class="mineCellGroup">
				<cell class="mineCell" :title="marketingChannelManage" @click.native="onClick('marketingChannelManage')">
					<img slot="icon" class="mine_icon" src="@/assets/svg/icon_channel.svg">
				</cell>
				<cell class="mineCell" :title="listQualityManage" @click.native="onClick('listQualityManage')">
					<img slot="icon" class="mine_icon" src="@/assets/svg/icon_quality.svg">
				</cell>
				<cell class="mineCell" :title="listObsoleteManage" @click.native="onClick('listObsoleteManage')">
					<img slot="icon" class="mine_icon" src="@/assets/svg/icon_recollection.svg">
				</cell>
			</group>

			<!--<group class="mineCellGroup">
				<cell class="mineCell" :title="listOfValueManage" @click.native="onClick('listOfValueManage')">
					<img slot="icon" class="mine_icon" src="../../../module/mavinTeacher/assets/svg/icon_list.svg">
				</cell>
			</group>-->
		</div>
	</div>
</template>

<script>
	import bus from '@/event/eventBus'
	import {Divider, Card, Cell, Group} from 'vux'
	export default {
		name: "sys-manage",
		components: {
			Divider,
			Card,
			Cell,
			Group
		},
		data() {
			return {
				userManage: '用户管理',
				roleManage: '角色管理',
				lessonManage: '教师课程管理',
				salesActManage: '销售活动管理',
				stageManage: '销售阶段管理',
				oppLevelManage: '商机级别管理',
				marketingChannelManage: '市场渠道管理',
				listQualityManage: '名单质量管理',
				listObsoleteManage: '丢弃原因管理',
				listOfValueManage: 'LOV列表管理'
			}
		},
		created: function () {
			bus.$emit("barController", 1)
			bus.$emit("userDefinedEvent", 4)
			bus.$emit("setTopSimpleTitle", '系统管理')
		},
		methods: {
			onClick: function(value) {
				switch(value){
					case 'userManage':
						this.$router.push('userManage')
						break
					case 'listOfValueManage':
						this.$router.push('listOfValueManage')
						break
					case 'roleManage':
						this.$router.push('roleManage')
						break
					case 'lessonManage':
						this.$router.push({name: 'elementManage', params: {templateTitle: this.lessonManage, templateType: 'S_LOV_LESSON', newComp: 'elementNewLesson'}})
						break
					case 'salesActManage':
						this.$router.push({name: 'elementManage', params: {templateTitle: this.salesActManage, templateType: 'S_LOV_SALES', newComp: 'elementNew'}})
						break
					case 'stageManage':
						this.$router.push({name: 'elementManage', params: {templateTitle: this.stageManage, templateType: 'S_LOV_OPP_STAGE', newComp: 'elementNew'}})
						break
					case 'oppLevelManage':
						this.$router.push({name: 'elementManage', params: {templateTitle: this.oppLevelManage, templateType: 'S_LOV_OPP_LEVEL', newComp: 'elementNew'}})
						break
					case 'marketingChannelManage':
						this.$router.push({name: 'elementManage', params: {templateTitle: this.marketingChannelManage, templateType: 'S_LOV_MARKETING_CHANNEL', newComp: 'elementNew'}})
						break
					case 'listQualityManage':
						this.$router.push({name: 'elementManage', params: {templateTitle: this.listQualityManage, templateType: 'S_LOV_MARKETING_QUALITY', newComp: 'elementNew'}})
						break
					case 'listObsoleteManage':
						this.$router.push({name: 'elementManage', params: {templateTitle: this.listObsoleteManage, templateType: 'S_LOV_OBSOLETE_REASON', newComp: 'elementNew'}})
						break
					default:
						break
				}
			}
		}
	}
</script>

<style lang="less">
	@import '../../../../node_modules/vux/src/styles/1px.less';

	.card-demo-flex {
		display: flex;
	}
	.card-demo-content01 {
		padding: 10px 0;
	}
	.card-padding {
		padding: 15px;
	}
	.card-demo-flex > div {
		flex: 1;
		text-align: center;
		font-size: 12px;
	}
	.card-demo-flex span {
		color: #f74c31;
	}

	.mine{
		background: #8080800d;
		margin-top: 46px;
		margin-bottom: 100px;
	}

	.mineCell{
		padding: 0 0 !important;
	}

	.mine_icon {
		width: 20px;
		display: block;
		margin-right: 25px;
		margin-left: 10px;
	}

	.mineCellGroup {
		border-radius: 0px !important;
	}

</style>
